package org.hook.showcase.pattern.command.impl;

import org.hook.showcase.pattern.command.Command;

public class MacroCommand implements Command {
	private Command[] commands;

	public MacroCommand(Command[] commands) {
		this.commands = commands;
	}

	@Override
	public void execute() {
		for (Command command : this.commands)
			command.execute();
	}

	@Override
	public void undo() {
		for (Command command : this.commands)
			command.undo();
	}
}
